#include "Main.h"

byte* cpartyPtr;

void CParty::Init()
{
	__try {
		cpartyPtr = (byte*)(*(dword*)Mem->GetAddress("CPartyPtr"));
	}
	__except(1) { }
}

char* CParty::GetPartyName()
{
	return (char*)(cpartyPtr + 0x04);
}

long CParty::GetPartySize()
{
	__try {
		return *(long*)(cpartyPtr + 0x24);
	}
	__except(1) {
		return NULL;
	}
}

CParty::PartyMember* CParty::GetPartyMember(long index)
{
	__try {
		return (PartyMember*)(cpartyPtr + 0x50 + (index * sizeof(PartyMember)));
	}
	__except(1) {
		return NULL;
	}
}